/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface M8ViewConstract extends BasicModel<M8ViewConstract> {
  name?: string; // 医院
  addr?: string; // 地址
  area?: string; // 区域
  areaCode?: string; // 区域编码
  ctype?: string; // 医疗机构性质
  typeCode?: string; // 医疗机构性质编码
  validData?: string; // 生效日期
  stopData?: string; // 终止日期
  syDays?: number; // 将要到期天数
  htStatus?: number; // 合同状态
}

export const m8ViewConstractList = (params?: M8ViewConstract | any) =>
  defHttp.get<M8ViewConstract>({ url: adminPath + '/bus/ht/m8ViewConstract/list', params });

export const m8ViewConstractListData = (params?: M8ViewConstract | any) =>
  defHttp.post<Page<M8ViewConstract>>({ url: adminPath + '/bus/ht/m8ViewConstract/listData', params });

export const m8ViewConstractForm = (params?: M8ViewConstract | any) =>
  defHttp.get<M8ViewConstract>({ url: adminPath + '/bus/ht/m8ViewConstract/form', params });

export const m8ViewConstractSave = (params?: any, data?: M8ViewConstract | any) =>
  defHttp.postJson<M8ViewConstract>({ url: adminPath + '/bus/ht/m8ViewConstract/save', params, data });

export const m8ViewConstractDelete = (params?: M8ViewConstract | any) =>
  defHttp.get<M8ViewConstract>({ url: adminPath + '/bus/ht/m8ViewConstract/delete', params });

export const m8ViewHospListUserData = (params?: M8ViewConstract | any) =>
  defHttp.post<Page<M8ViewConstract>>({ url: adminPath + '/bas/hosp/m8ViewHosp/listUserData', params });